<template>
	<view>
		<swiper :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration"
		 indicator-active-color="#ffffff" class="swiper-image" circular>
			<!-- 图片 -->
			<swiper-item v-for="(item, index) in swiperList" :key="index">
				<image :src="item.image"></image>
			</swiper-item>

		</swiper>
	</view>
</template>

<script>
	export default {
		props: {
			// 小点
			indicatorDots: {
				type: Boolean,
				default: true
			},
			// 自动播放
			autoplay: {
				type: Boolean,
				default: true
			},
			// 时间间隔
			interval: {
				type: Number,
				default: 2000
			},
			// 拖动滑动动画时长
			duration: {
				type: Number,
				default: 500
			},
			// 轮播图片
			swiperList: {
				type: Array,
				default () {
					return []
				}
			}
		},
	}
</script>

<style lang="less">
	.swiper-image {
		height: 400rpx;
		image {
			width: 100%;
			height: 100%;
		}
	}
</style>
